woogc/ps/interfaces/synchronize_to_sites
Name: woogc/ps/interfaces/synchronize_to_sites
Type: Filter
Arguments: $sites
The filter allows you to regulate the shops that are accessible within the Synchronization Interface, determining where the feature is available.
The following example check if the edit page is for product ID 33 and 44. If match, it disable the synchronization option to the Shop ID 2:
add_filter ( 'woogc/ps/interfaces/synchronize_to_sites', 'woogc_ps_interfaces_synchronize_to_sites' );
function woogc_ps_interfaces_synchronize_to_sites( $sites )
{
global $post;
if ( ! in_array ( $post->ID, array ( 33, 40 ) ) )
return $sites;
foreach ( $sites as $key => $site )
{
if ( $site->blog_id == '2' )
unset ( $sites[ $key ] );
}
return $sites;
}
The code should be placed inside a php file on wp-content/mu-plugins folder.
Related Posts
WooCommerce Global Cart is...
By default, WooCommerce retains...
WooCommerce’s persistent cart feature...
Managing multiple WooCommerce shops within a WordPress Multisite environment can be challenging, especially when it comes to keeping product information consistent across all stores. The WooCommerce Product Synchronization feature in the WP Global Cart plugin addresses this challenge by enabling seamless synchronization of products across your network.
Name: woogc/sequential_order_number/format
Type: Filter
Arguments: (int) $order_number,...
Name: woogc/global_cart/sites
Type: Filter
Arguments: (array) $sites_ids
The...
Name: woogc/single_checkout/split_order/order_created
Type: Action
Arguments: $new_order
The `woogc/single_checkout/split_order/order_created` action...
The WordPress WooCommerce Global...
By default, on Product...